package com.xiancheng;

import java.util.concurrent.TimeUnit;

import static java.util.concurrent.TimeUnit.SECONDS;

public class Tr1 implements Runnable {

    public void run() {

        /*try {
            test01();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/

        synchronized ("7"){
            System.out.println("================");
        }






    }

    public synchronized void test01() throws InterruptedException {

        for(int i=0;i<5;i++){
            Thread.sleep(1000);
            System.out.println(Thread.currentThread().getName()+"==========="+i);
        }

    }


    public synchronized static void test02() throws InterruptedException {
        for(int i=0;i<5;i++){
            Thread.sleep(1000);
            System.out.println(Thread.currentThread().getName()+"==========="+i);
        }
    }

}
